package cn.learn.base;

import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.view.View.OnClickListener;
import cn.learn.base.activity.ViewPagerActivity;

public class IndexActivity extends BaseActivity {
    /** Called when the activity is first created. */
    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setView(R.layout.main);
        SetTitle("测试");
        setTitleBar(-1, "", -1, "");
        
        findViewById(R.id.btn_type1).setOnClickListener(new OnClickListener() {
			@Override
			public void onClick(View v) {
				Intent i = new Intent(IndexActivity.this,TabBarActivity.class);
				startActivity(i);
			}
		});
        
        findViewById(R.id.btn_type2).setOnClickListener(new OnClickListener() {
        	@Override
        	public void onClick(View v) {
        		Intent i = new Intent(IndexActivity.this,TestActivity.class);
        		startActivity(i);
        	}
        });
        findViewById(R.id.btn_viewpager).setOnClickListener(new OnClickListener() {
        	@Override
        	public void onClick(View v) {
        		Intent i = new Intent(IndexActivity.this,ViewPagerActivity.class);
        		startActivity(i);
        	}
        });
        findViewById(R.id.btn_tabhost).setOnClickListener(new OnClickListener() {
        	@Override
        	public void onClick(View v) {
        	}
        });
        
        
    }
    
    
    
	@Override
	protected void HandleTitleBarEvent(int buttonId) {
		// TODO Auto-generated method stub
		if(buttonId == 0 ){
			finish();
		} else if(buttonId == 1){
			
		}
	}
	
	
	
	
}